#ifndef __USER_DEFINE_H_
#define __USER_DEFINE_H_

#define MODEL_INPUT_SIZE 640
#define MAX_SESSION_NUM 2

#define DRAW_RESULT_BOX_CHN_INDEX 0
#define RK_NN_RGA_CHN_INDEX 1

#define OBJ_CLASS_NUM 80
#define PROP_BOX_SIZE (5 + OBJ_CLASS_NUM)
#define OBJ_NAME_MAX_SIZE 16
#define OBJ_NUMB_MAX_SIZE 64
#define RKNN_BOX_BORDER 4

#define MAX_RKNN_LIST_NUM 10
#define UPALIGNTO(value, align) ((value + align - 1) & (~(align - 1)))
#define UPALIGNTO16(value) UPALIGNTO(value, 16)
#define YOLO_INPUT_SIZE (MODEL_INPUT_SIZE * MODEL_INPUT_SIZE * 3)
#define FPS 25

#define NMS_THRESHOLD 0.45
#define RTSP_INPUT_VI_WIDTH 1920
#define RTSP_INPUT_VI_HEIGHT 1080

#define MONITOR_RGA_CHN 0
#define MONITOR_VENC_CHN 0
#define RKNN_RGA_CHN 1
#define ONLY_ONE_VI_CHN 0

#define X_START ((RTSP_INPUT_VI_WIDTH - MODEL_INPUT_SIZE) / 2)
#define Y_START ((RTSP_INPUT_VI_HEIGHT - MODEL_INPUT_SIZE) / 2)

// 用于rknn推理的图像压缩后的大小
#define RKNN_INPUT_IMG_WIDTH 640
#define RKNN_INPUT_IMG_HEIGHT 360
#define RKNN_INPUT_IMG_RGB_SIZE (RKNN_INPUT_IMG_WIDTH * RKNN_INPUT_IMG_HEIGHT * 3)

#define PASS_FRAME_NUM 20
#define IS_FILE_NOT_FOLDER 8
#define IS_NOT_HIDEN_FILE 20
#define MP4_FILE_NAME_LEN 18
#define VIDEO_TRACK_TIME_SCALE 90000
#define VIDEO_FPS     FPS // 30
#define MIPI_2_DEV_ID 1

#define SPS_FRAME_LEN 26
#define PPS_FRAME_LEN 4
#define FRAME_START_FLAG_LEN 4

#define PERF_WITH_POST 1
#define COCO_IMG_NUMBER 5000
#define DUMP_INPUT 0
#define WATER_MARK_TEXT_LINES 3

#endif
